<%- include('common/header') %>
<h1 class="text-center color">用户注册</h1>
<div class="horizontal-centrol padding-20">
    <form id="registerForm" role="form" class="form-horizontal">
        <div class="form-group">
            <label class="control-label col-sm-3" for="name">用户名</label>
            <div class="col-sm-8">
                <input type="text" class="form-control" id="name" name="user" placeholder="请输入用户名" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-3" for="psw">密码</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="psw" name="password" placeholder="请输入密码" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-3" for="confirmPsw">确认密码</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="confirmPsw" name="confirmPsw" placeholder="请输入确认密码" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-3" for="email">邮箱</label>
            <div class="col-sm-8">
                <input type="email" class="form-control" id="email" name="email" placeholder="请输入邮箱" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-3" for="file">文件上传</label>
            <div class="col-sm-8">
                <input type="file"  id="file" name="file" multiple />
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-8">
                <input type="text" class="form-control hide" id="fileVal"  name="fileVal" />
            </div>
        </div>
        <div class="col-sm-offset-3">
            <div class="text-center col-sm-4">
                <button type="button" class="btn  btn-primary" onclick="save_user_info()">确定</button>
            </div>
            <div class="text-center col-sm-4">
                <button type="button" class="btn  btn-primary " onclick="jump_page('/signin')">取消</button>
            </div>
        </div>
    </form>
</div>
<script src="/common/bootstrap-file/js/fileinput.min.js" type="text/javascript"></script>
<script type="text/javascript" >
    $('#file').fileinput({
        uploadUrl:'/register/upload',
        uploadAsync:false,
        showBrowse:false,
        browseOnZoneClick:true
    });
    $('#file').on('filebatchuploadsuccess', function(event, data, previewId, index) {
        console.log('2222222222222')
        console.log(data.response)
        $('#fileVal').val(data.response.data.path)
    });
</script>
<script type="text/javascript" src="/javascripts/register.js"></script>
<%- include('common/footer') %>

